package com.bub.pay.framework.common.util;

import java.io.PrintWriter;
import java.io.StringWriter;

/**
 * 异常工具类
 *
 * @author recall
 * @date 2019/8/10
 */
public class ExceptionUtil {

    /**
     * 异常转化String
     * @param e 异常
     * @return 字符串
     */
    public static String toString(Exception e) {
        StringWriter writer = new StringWriter();
        e.printStackTrace(new PrintWriter(writer));
        return writer.toString();
    }

}
